{% extends 'partials/base.html.twig' %}

{% if form is null %}
    {% set form = grav.session.getFlashObject('form') %}
{% endif  %}

{% block content %}
    {{ content|raw }}

    {% if form %}
        {% if form.message %}
        <div class="alert notices {{ form.message_color ?: 'green' }}"><p>{{ form.message|raw }}</p></div>
        {% endif %}
        <p>{{ 'PLUGIN_FORM.DATA_SUMMARY'|t }}</p>

        {% include "forms/data.html.twig" %}
    {% else %}
        <div class="alert notices yellow"><p>{{ 'PLUGIN_FORM.NO_FORM_DATA'|t }}</p></div>
    {% endif %}

{% endblock %}
